//package com.example.springboottest.student.controller;
//
//
//import com.example.springboottest.student.model.Student;
//import com.example.springboottest.student.service.StuFluxService;
//import io.swagger.annotations.ApiImplicitParam;
//import io.swagger.annotations.ApiImplicitParams;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//import reactor.core.publisher.Flux;
//import reactor.core.publisher.Mono;
//
//@RestController
//@RequestMapping("stuFlux")
//public class StuFluxController {
//    @Autowired
//    private StuFluxService stuFluxService;
//
//    @ApiOperation(value = "按ID查询学生")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "id", value = "学生ID", required = true, dataType = "String")
//    })
//    @RequestMapping(value = "/getById.api", method = {RequestMethod.POST, RequestMethod.GET})
//    public Mono<Student> getById(@RequestParam(value = "id") String id) {
//        return stuFluxService.doFindById(id);
//    }
//
//    @ApiOperation(value = "创建学生，默认创建成绩")
//    @PostMapping(value = "/create.api")
//    public Mono<Student> create(@RequestBody Student student) {
//        return stuFluxService.doCreate(student);
//    }
//
//    @ApiOperation(value = "修改学生")
//    @PostMapping(value = "/update.api")
//    public Mono<Student> update(@RequestBody Student student) {
//        return stuFluxService.doUpdate(student);
//    }
//
//    @ApiOperation(value = "查询所有学生")
//    @PostMapping(value = "/findAll.api")
//    public Flux<Student> findAll() {
//        return stuFluxService.doFindALl();
//    }
//
//    @ApiOperation(value = "按ID删除学生")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "id", value = "学生ID", required = true, dataType = "String")
//    })
//    @RequestMapping(value = "/deleteById.api", method = {RequestMethod.POST, RequestMethod.GET})
//    public Mono<Void> deleteById(@RequestParam(value = "id") String id) {
//        return stuFluxService.doDeleteById(id);
//    }
//}